Skip to content

feat(auth): add a narrow ingest perimeter scope - #363

Merged
fazpu merged 1 commit into
mainfrom
feat/ingest-scope
Sep 3, 2026
Merged

feat(auth): add a narrow ingest perimeter scope#363
fazpu merged 1 commit into
mainfrom
feat/ingest-scope

Conversation

@fazpu

@fazpu fazpu commented Sep 3, 2026

Copy link
Copy Markdown
Member

Problem

D62 needs a browser to add one document without gaining either read access to memory or authority to create a standing connector. The perimeter previously had only read and write, so POST /ingest required the broad write scope.

What this does

  • adds the closed ingest perimeter scope and maps only POST /ingest to it
  • keeps write as the full scope that also satisfies ingest; keeps read and ingest disjoint
  • exercises real signed credentials at the HTTP perimeter, including connector/search/operation refusals and the write-token compatibility path
  • preserves fail-closed WRITE classification for unenumerated routes

How verified

  • uv run pytest src/tests/surfaces/test_route_scope.py src/tests/adapters/test_signed_token_auth.py src/tests/surfaces/test_openapi_export.py -q — 73 passed after rebase
  • uv run lint-imports
  • uv run ruff check src/ benchmarks/
  • uv run ruff format --check src/ benchmarks/
  • uv run pyright src/ benchmarks/
  • uv run python scripts/export_openapi.py -o openapi.json — 25 routes; no schema diff
  • full uv run pytest src/tests -q — 2,198 passed, 2 skipped, 1 failed locally after 1h58m; the failure is the pre-existing/out-of-scope macOS MIME assertion test_sdk_pushes_lineage_metadata_to_e0 (.md detected as application/octet-stream). A focused rerun reproduced it. Per the package safety rule, this PR does not touch MIME routing or PR feat(e0): refuse an unroutable MIME at the E0 gate instead of dead-lettering it (D104) #342; Linux CI is the authoritative full-suite result.

Docs

website/src/app/docs/configuration/page.mdx now documents all three signed-credential scopes and their exact reach.

Contributor agreement

Add the D62 ingest scope so browser credentials can upload one document without gaining read access or standing connector authority. Keep WRITE as the only scope that crosses route classes, exercise real signed credentials at the HTTP perimeter, and document the closed three-scope vocabulary.
@fazpu
fazpu merged commit d8dcf93 into main Sep 3, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant